import Dao from "../../../../utils/dao";

export async function getbestSales(paging) {
    var {limit, offset} = paging
    // 带有占位符的 cql 语句
    var query = new AV.Query('salesCount');
    var result = await query.ascending('count').limit(limit).skip(offset).include('design').find().then(res => res.map(item => item.toJSON()));
    return result
}


export async function getnew(options, {limit, offset}) {
    var designDao = new Dao("design")
    /*designSalesCount  sort   designId: "", salesCount: 0,
    * designItem objectId
    *
    * */
    var result = await designDao.select(options).limit(limit).skip(offset)
    return result
}